<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<link rel="stylesheet" href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	  // 在这里写你的代码...
	  $("#ok_btn").click(function(){
		  var terminateDate = $("#terminateDate").val();
		  var contract_type = $("#contract_type").val();
		  if(terminateDate !=null && '' != terminateDate){
			  $("#form").attr("action","${contextPath}/biz/contract/"+contract_type+"/${id}/"+terminateDate+"/close?navId=${navId}").submit();
			  $("#ok_btn").attr("data-dismiss","modal");
		  }else{
			  top.$.jBox.tip('请输入撤柜日期','warning');
			  return;
		  }
	  });
	  
});
</script>
<div class="modal-dialog">
	<div class="modal-content">
		
		<!-- /modal-header -->
		<div class="modal-body">
			<table class="table">
				<tr>
					<form:form id="form" method="post"></form:form>
					<td>
						<div class="col-sm-12">
							<label for="brandAttribute_lab" class="col-sm-5 control-label">撤柜日期</label>
							<div class="col-sm-8 f_6">
	                        <div class="input-group date o-a-form-datetime" data-date="" data-date-format="yyyy-mm-dd">
	                            <input class="form-control f_13" type="text" readonly id="terminateDate" name="terminateDate"/>
	                            <span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                            <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
	                        </div>
	                      </div>
						</div>
					</td>
				</tr>
			</table>

		</div>
		<!-- /modal-body -->
		<div class="modal-footer">
			<button type="button" id="ok_btn" 
				class="btn btn-primary">确定</button>
			<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
		</div>
		<!-- /modal-footer -->
	</div>
</div>
<script type="text/javascript">
	$('.o-a-form-datetime').datetimepicker({
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0,
		format: 'yyyy-mm-dd'
    });

</script>
</body>
<script type="text/javascript" src="${staticPath}/js/list.js"></script>